<?php
/**
 * Created by PhpStorm.
 * User: Administrator
 * Date: 2017/10/27
 * Time: 15:49
 */

namespace app\admin\controller;

use think\Controller;
use think\Loader;
Loader::addNamespace('data','data/');

class Base extends Controller
{
    public function __construct()
    {
        parent::__construct();
        if(!session('name')){
            $this->error('请先登录','Login/login');
        }else{
            $this->assign('name',session('name'));
            $this->assign('uid',session('uid'));
            $this->assign('avatar',session('avatar'));
        }
    }
}